/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AdminView.java
 *
 * Created on 23.Eki.2010, 17:44:10
 */
package view.user;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLayeredPane;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import model.user.User;

/**
 *
 * @author CUNEYT
 */
public class AdminView extends javax.swing.JPanel {

    /** Creates new form AdminView */
    public AdminView() {
        initComponents();
        userRolesComboBox.addItem(User.STAFF);
        userRolesComboBox.addItem(User.DIRECTOR);
        userRolesComboBox.addItem(User.GOVERNOR);
        userRolesComboBox.addItem(User.ADMIN);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jToolBar1 = new javax.swing.JToolBar();
        editUserButton = new javax.swing.JButton();
        editSkillsButton = new javax.swing.JButton();
        adminLayeredPane = new javax.swing.JLayeredPane();
        userPanel = new javax.swing.JPanel();
        userScrollPane = new javax.swing.JScrollPane();
        userList = new javax.swing.JList();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        userPasswordTextField = new javax.swing.JTextField();
        userNAmeTextField = new javax.swing.JTextField();
        userSurnameTextField = new javax.swing.JTextField();
        userNameTextField = new javax.swing.JTextField();
        updateUserButton = new javax.swing.JButton();
        deleteUserButton = new javax.swing.JButton();
        addUserButton = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        userRolesComboBox = new javax.swing.JComboBox();
        skillPanel = new javax.swing.JPanel();
        skillScrollPane = new javax.swing.JScrollPane();
        skillList = new javax.swing.JList();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        deleteSkillButton = new javax.swing.JButton();
        updateSkillButton = new javax.swing.JButton();
        skillTitleTextField = new javax.swing.JTextField();
        skillLevelTextField = new javax.swing.JTextField();
        addSkillButton = new javax.swing.JButton();

        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        editUserButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/clients.png"))); // NOI18N
        editUserButton.setText("USER OP");
        editUserButton.setFocusable(false);
        editUserButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        editUserButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(editUserButton);

        editSkillsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/skills.png"))); // NOI18N
        editSkillsButton.setText("SKILL OP");
        editSkillsButton.setFocusable(false);
        editSkillsButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        editSkillsButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(editSkillsButton);

        userList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        userList.setVisibleRowCount(-1);
        userScrollPane.setViewportView(userList);

        jLabel1.setText("Name");

        jLabel2.setText("Surname");

        jLabel3.setText("Username");

        jLabel4.setText("Password");

        updateUserButton.setText("UPDATE");
        updateUserButton.setEnabled(false);

        deleteUserButton.setText("DELETE USER");
        deleteUserButton.setEnabled(false);

        addUserButton.setText("ADD USER");

        jLabel7.setText("Role");

        javax.swing.GroupLayout userPanelLayout = new javax.swing.GroupLayout(userPanel);
        userPanel.setLayout(userPanelLayout);
        userPanelLayout.setHorizontalGroup(
            userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(userPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(deleteUserButton)
                    .addComponent(userScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(userPanelLayout.createSequentialGroup()
                        .addGap(38, 38, 38)
                        .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, userPanelLayout.createSequentialGroup()
                                .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel4)
                                    .addComponent(jLabel7))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(userRolesComboBox, 0, 128, Short.MAX_VALUE)
                                    .addComponent(userPasswordTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                                    .addComponent(userSurnameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                                    .addComponent(userNAmeTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                                    .addComponent(userNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)))))
                    .addGroup(userPanelLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(updateUserButton)
                            .addComponent(addUserButton))))
                .addGap(188, 188, 188))
        );
        userPanelLayout.setVerticalGroup(
            userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(userPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(userPanelLayout.createSequentialGroup()
                        .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(userNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(userSurnameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(userNAmeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(userPasswordTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(userPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(userRolesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(updateUserButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(addUserButton))
                    .addComponent(userScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 259, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(deleteUserButton)
                .addContainerGap())
        );

        userPanel.setBounds(10, 0, 680, 310);
        adminLayeredPane.add(userPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        skillList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        skillScrollPane.setViewportView(skillList);

        jLabel5.setText("Title");

        jLabel6.setText("Level");

        deleteSkillButton.setText("DELETE SKILL");

        updateSkillButton.setText("UPDATE");

        addSkillButton.setText("ADD SKILL");

        javax.swing.GroupLayout skillPanelLayout = new javax.swing.GroupLayout(skillPanel);
        skillPanel.setLayout(skillPanelLayout);
        skillPanelLayout.setHorizontalGroup(
            skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(skillPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(deleteSkillButton)
                    .addComponent(skillScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6))
                .addGap(18, 18, 18)
                .addGroup(skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(skillLevelTextField)
                    .addComponent(skillTitleTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE)
                    .addGroup(skillPanelLayout.createSequentialGroup()
                        .addComponent(updateSkillButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(addSkillButton)))
                .addContainerGap(131, Short.MAX_VALUE))
        );
        skillPanelLayout.setVerticalGroup(
            skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(skillPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(skillPanelLayout.createSequentialGroup()
                        .addGroup(skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(skillTitleTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(skillLevelTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(skillPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(updateSkillButton)
                            .addComponent(addSkillButton)))
                    .addComponent(skillScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(deleteSkillButton)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        skillPanel.setBounds(15, 4, 580, 290);
        adminLayeredPane.add(skillPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(adminLayeredPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 696, Short.MAX_VALUE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 696, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(adminLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    public JComboBox getUserRolesComboBox() {
        return userRolesComboBox;
    }

    public JButton getAddUserButton() {
        return addUserButton;
    }

    public JLayeredPane getAdminLayeredPane() {
        return adminLayeredPane;
    }

    public JButton getDeleteUserButton() {
        return deleteUserButton;
    }

    public JButton getEditSkillsButton() {
        return editSkillsButton;
    }

    public JButton getEditUserButton() {
        return editUserButton;
    }

    public JButton getUpdateUserButton() {
        return updateUserButton;
    }

    public JList getUserList() {
        return userList;
    }

    public JTextField getUserNAmeTextField() {
        return userNAmeTextField;
    }

    public JTextField getUserNameTextField() {
        return userNameTextField;
    }

    public JPanel getUserPanel() {
        return userPanel;
    }

    public JTextField getUserPasswordTextField() {
        return userPasswordTextField;
    }

    public JTextField getUserSurnameTextField() {
        return userSurnameTextField;
    }

    public JButton getDeleteSkillButton() {
        return deleteSkillButton;
    }

    public JTextField getSkillLevelTextField() {
        return skillLevelTextField;
    }

    public JList getSkillList() {
        return skillList;
    }

    public JTextField getSkillTitleTextField() {
        return skillTitleTextField;
    }

    public JButton getUpdateSkillButton() {
        return updateSkillButton;
    }

    public JPanel getSkillPanel() {
        return skillPanel;
    }

    public JButton getAddSkillButton() {
        return addSkillButton;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addSkillButton;
    private javax.swing.JButton addUserButton;
    private javax.swing.JLayeredPane adminLayeredPane;
    private javax.swing.JButton deleteSkillButton;
    private javax.swing.JButton deleteUserButton;
    private javax.swing.JButton editSkillsButton;
    private javax.swing.JButton editUserButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JTextField skillLevelTextField;
    private javax.swing.JList skillList;
    private javax.swing.JPanel skillPanel;
    private javax.swing.JScrollPane skillScrollPane;
    private javax.swing.JTextField skillTitleTextField;
    private javax.swing.JButton updateSkillButton;
    private javax.swing.JButton updateUserButton;
    private javax.swing.JList userList;
    private javax.swing.JTextField userNAmeTextField;
    private javax.swing.JTextField userNameTextField;
    private javax.swing.JPanel userPanel;
    private javax.swing.JTextField userPasswordTextField;
    private javax.swing.JComboBox userRolesComboBox;
    private javax.swing.JScrollPane userScrollPane;
    private javax.swing.JTextField userSurnameTextField;
    // End of variables declaration//GEN-END:variables
}
